package user

import (
	"context"
	"google.golang.org/grpc/codes"
	"google.golang.org/grpc/status"
	pb "rpc/proto/user"
	"rpc/server"
)

type RetServer struct {
	pb.UnimplementedUserServer
}

func (s *RetServer) Greet(ctx context.Context, in *pb.UserCreateReq) (*pb.UserCreateResp, error) {
	_, err := server.CreateUser(in)
	if err != nil {
		return nil, status.Errorf(codes.Unimplemented, "method Greet not implemented")
	}
	return &pb.UserCreateResp{}, nil
}
